<!DOCTYPE html>
<html   lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/loginStyle.css}" />
    <link th:href="@{/assets/img/favicon.png}" rel="icon">
    <link th:href="@{/assets/img/apple-touch-icon.png}" rel="apple-touch-icon">
  </head>
  <body>
    <div class="form-structor" >
      <div class="signup">
        <h2 class="form-title" id="signup"><span></span>用户</h2>
          <form th:action="@{/user/login}">
            <div class="form-holder">
              <input type="text" class="input" placeholder="用户名" name="userName" />
              <input type="password" class="input" placeholder="密码" name="userPwd" />
            </div>
             <input type="submit" value="登录" class="submit-btn" >
             <input type="button" value="注册" class="submit-btn" th:onclick="userRegister()">
            <script>
                function userRegister() {
                    location.href='[[@{/user/userID}]]'
                }
            </script>
        </form>
      </div>
      <div class="login slide-up">
        <div class="center">
          <h2 class="form-title" id="login"><span></span>商家</h2>
          <form th:action="@{/merchant/login}">
              <div class="form-holder">
                <input type="text" class="input" placeholder="用户名" name="merchantName" />
                <input type="password" class="input" placeholder="密码" name="merchantPwd" />
              </div>
              <input type="submit" value="登录" class="submit-btn" >
              <input type="button" value="注册" class="submit-btn" th:onclick="merchantRegister()" >
            <script>
              function merchantRegister() {
                location.href='[[@{/merchant/merchantID}]]'
              }
            </script>
          </form>
        </div>
      </div>
    </div>
  </body>
  <script th:src="@{/js/login.js}"></script>
</html>
